#define _CRT_SECURE_NO_WARNINGS 1
#include<bits/stdc++.h>
using namespace std;
const int N = 1e6 + 10;
char s[N];

int main() {
    ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
    cin >> s + 1;
    int n = strlen(s + 1);
    int l = 1, r = n;
    bool ans = true;
    while (l < r) {
        if (s[l] != s[r]) {
            ans = false;
            break;
        }
        else l++, r--;
    }
    if (ans) cout << "Y" << '\n';
    else cout << "N" << '\n';
    return 0;
}